home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / datatypes / clidt / doc / cli_dtc.doc next >
Text File  |  1996-04-07  |  2KB  |  63 lines

  1.  
  2.  
  3. TABLE OF CONTENTS
  4.  
  5. cli.datatype/cli.datatype
  6.  
  7.  
  8. cli.datatype/cli.datatype                            cli.datatype/cli.datatype
  9.  
  10.     NAME
  11.         cli.datatype - data type for launching extern programs and
  12.             displaying the command's standard output
  13.  
  14.     FUNCTION
  15.         This datatype launches an extern command and displays the standard
  16.         output of that command. This is useful to view the contents of a
  17.         archive like lha or tar archives without writing a complete datatype.
  18.         The standard output is placed in a tempory file in "T:", because the
  19.         datatypes.library can't handle pipes. From V39.2 the cli.datatype
  20.         uses NewDTObject() for the tempory file. So it's possible to display
  21.         files, which have special datatypes (e.g. Unix-Manual-Pages).
  22.  
  23.     PREFS
  24.         The cli datatype is configured by a preference file "cli.prefs" in
  25.         "PROGDIR:Prefs/Datatypes/" or "Env:Datatypes/".
  26.         The file is parsed using ReadArgs() with the following template :
  27.  
  28.         "DATATYPE/A,STACK/N/K,SUFFIX/K,COMMAND/F/K/A"
  29.  
  30.         DATATYPE - specifies the datatype
  31.         STACK    - size of stack to use for the command
  32.         SUFFIX   - suffix to use for tempory file, thus the datatypes.library
  33.             can determine the type of the file (e.g: ".0" for Man-Datatype)
  34.         COMMAND  - specifies the command to launch for that datatype, a "%s"
  35.             in the command string is replaced by the real filename.
  36.  
  37.     EXAMPLE
  38.         ; cli.datatype preference file
  39.         Lha                         COMMAND=lha v %s
  40.         Tar                         COMMAND=tar tvf %s
  41.         NRoff STACK=50000 SUFFIX=.0 COMMAND=bin:groff -man -Tascii %s
  42.  
  43.     METHODS
  44.         OM_NEW - create a new object and launch the extern command
  45.  
  46.         OM_DISPOSE - delete the object
  47.  
  48.     TAGS
  49.         none
  50.  
  51.     NOTE
  52.         With the used method of creating and handling of tempory output, it's
  53.         also possible to create a special datatype for crunshed files through
  54.         PowerPacker or XPK. All what have to be done is to create a tempory
  55.         file and then call NewDTObject() on that. The source of the
  56.         cli.datatype gives a the skeleton for such datatypes. Please feel
  57.         free
  58.         to implement XPK or PowerPacker datatypes. I don't do this.
  59.  
  60.     SEE ALSO
  61.         text.datatype, ascii.datatype, datatypes.library
  62.  
  63.